{include file="Main/menu" /}
<form method="post">
  <div class="panel admin-panel" style="background: #fff">
    <div class="panel-head"><strong>{:lang('currency')['list']}</strong></div>
    <div class="padding border-bottom"> 
      <script>
		//city 参数和回调
		var pid="{:input('get.pid')}";
		var cid="{:input('get.cid')}";
		var aid="{:input('get.aid')}";
		var selectc = true;
		var selecta = true;
		function select_p(){
			return false;
		}
		function select_c(){
            return false;
		}
		function select_a(){
            location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
		}
        function show_address(name,url) {
            parent.layer.open({
                type: 1,
                title:'配送员 '+name+' 位置',
                area: ['80%', '80%'], //宽高
                content: '<iframe width="100%" height="100%" frameborder="0" src="'+url+'"><\/iframe>'
            });
        }
        function edit(url) {
            parent.layer.open({
                type: 2,
                title:'配送员',
                area: ['80%', '80%'], //宽高
                content: url
            });
        }
		</script>
      <input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="{:lang('currency')['all_select']}" onclick="Select_All()" />
      <a type="button" class="button button-small border-green" href="javascript:edit('__URL__/edit.html')" />{:lang('currency')['add']}</a>
      <a id="select_del" type="button" class="button button-small border-red" />{:lang('currency')['del']}</a>
      --- {include file="public/city" /}
    </div>
    <table class="am-table am-table-striped am-table-hover table-main">
      <tr>
        <th width="60">{:lang('label')['select']}</th>
        <th width="120">{:lang('label')['headimg']}</th>
        <th width="200">{:lang('label')['name']}</th>
        <th width="100">{:lang('label')['phone']}</th>
        <th width="100">性别</th>
        <th width="100">类型</th>
        <th width="100">{:lang('label')['handle']}</th>
      </tr>
      {volist name="data" id="express"}
      <tr>
        <td ><input type="checkbox" name="box" value="{$express.id}" /></td>
        <td><img width="40" class="radius-circle" height="40" src="{$express.true_head}"/></td>
        <td style="line-height:40px">{$express.true_name}</td>
        <td style="line-height:40px">{$express.phone}</td>
        <td>{if !$express.sex || $express.sex == 0}女{elseif $express.sex == 1}男{else}保密{/if}</td>
        <td>{$express.express_type_name}</td>
        <td style="line-height:40px">
          <a class="button border-blue button-little" href="javascript:edit('__URL__/edit.html?id={$express.id}')">编辑</a>
          <a class="button border-yellow button-little" href="__URL__/del.html?id={$express.id}&page={:input('get.page')}" onclick="if(confirm('撤销该用户跑客功能？')){return true;}return false;">{:lang('currency')['del']}</a>
          <a class="button border-green button-little" href="javascript:show_address('{$express.name}','http://uri.amap.com/marker?position={$express.lng},{$express.lat}')">查看位置</a>
        </td>
      </tr>
      {/volist}
    </table>
  </div>
</form>
<script>
$('#select_del').click(function(){
	var str='';
	$("input:checkbox[name='box']:checked").each(function(){
		str+=$(this).val()+",";
	});
	if(str!==''){
	       if(confirm('撤销该用户的认证？')){
                location.href='__URL__/del.html?id='+str;
            }
	}
});
function Select_All() {
    var box = $("input[name='box']");
    for (var i in box){
        box[i].checked = !box[i].checked;
    }
}
function set() {
    layer.open({
        type:2,
        title:'',
        area: ['700px', '375px'],
        content:'__URL__/set'
    });
}
</script>
{include file="Main/menu_footer" /}